<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>管理员管理-有点</title>
    <link rel="stylesheet" type="text/css" href="<?php echo Url::base(); ?>/resource/css.css">
    <link rel="stylesheet" type="text/css" href="<?php echo Url::base(); ?>/resource/pageGroup.css">

    <script src="<?php echo Url::base();?>jquery.min.js" type="text/javascript"></script>
    <script src="<?php echo Url::base(); ?>jquery.uploadify.min.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="<?php echo Url::base(); ?>uploadify.css">


    <link rel="stylesheet" type="text/css" href="<?php echo Url::base(); ?>/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="<?php echo Url::base(); ?>/themes/icon.css">
    <script type="text/javascript" src="<?php echo Url::base(); ?>/jquery.easyui.min.js"></script>
    <!-- <script type="text/javascript" src="js/page.js" ></script> -->
</head>
<body>
<form method="post" action="<?php echo Url::base(); ?>index.php/setm/update?type=2">
    <?php

    foreach($data as $key=>$value){?>


        <script>

            $(function(){
                $('#file_upload<?php echo $key;?>').uploadify({

                    'formData'     : {
                    },
                    'swf'      : '<?php echo Url::base(); ?>uploadify.swf',
                    'uploader' : '<?php echo Url::base(); ?>index.php/productm/upload',
                    'onUploadSuccess':function(file,data,response){
                        if(data== 'false'){
                            alert("图片格式不正确请检查")
                        }else{
                            alert("上传成功")
                            $("input[attr='file_upload<?php echo $key;?>']").val(data)

                        }}

                });
            })
        </script>

        <input type="hidden"  attr="file_upload<?php echo $key;?>" value="<?php echo $value['img'];?>" name="mainpic[]"><br>
    <?php
    if($value['img']!=""){
        echo '<img src="'. Url::base() .'/uploads/'.$value['img'].'" height="100" width="100" >';

    }

    ?>
        <input id="file_upload<?php echo $key;?>" name="name" type="file" multiple="true">
        标题<input  name="title[]"  value="<?php echo $value['title'];?>" type="text" id="">
        描述<input  name="content[]"  value="<?php echo $value['content'];?>" type="text" id="">
        顺序<input  name="sort[]"  value="<?php echo $value['sort'];?>" type="text" id="">
        <input  name="productId[]" value="<?php echo $value['productId'];?>" id="cc" class="easyui-combogrid" style="width:250px" data-options="
			panelWidth: 500,
			idField: 'id',
			textField: 'title',
			rownumbers:true,singleSelect:true,url:'<?php echo Url::base(); ?>index.php/productm/getListShelves',method:'get',pagination:true,

			method: 'get',
			columns: [[
				{field:'id',width:80,title:'主键'},
				{field:'productNumber',width:100,title:'编号'},
				{field:'replying',width:100,title:'回复数'},
				{field:'title',width:180,title:'评价分数'},

			]],
			fitColumns: true
		">
        <br>


        <?php
    }
    ?>

    <input type="submit">
</form>
</body></html>